package app.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("userPage")
public class UserPageController {
	//用户主页
    @RequestMapping("/index")
    public String index(){
    	return "user/user";
    }
	
	/*
	 * 报修管理
	 * */
	//新增报修
    @RequestMapping("/addFixOrder")
    public String addFixOrder(){
    	return "user/addFixOrder";
    }
    
    //报修记录
    @RequestMapping("/fixOrderList")
    public String fixOrderList(){
    	return "user/fixOrderList";
    }
    
    //报修信息
    @RequestMapping("/fixOrderInfo/{id}")
    public String fixOrderInfo(@PathVariable(value="id")int fixOrderId,Model model){
    	model.addAttribute("fixOrderId",fixOrderId);
    	return "user/fixOrderInfo";
    }
    
    //报修状态信息
    @RequestMapping("/fixOrderStatus/{id}")
    public String fixOrderStatus(@PathVariable(value="id")int fixOrderId,Model model){
    	model.addAttribute("fixOrderId",fixOrderId);
    	return "user/orderStatus";
    }
    
    //所有报修状态信息列表
    @RequestMapping("/orderStatusList")
    public String fixOrderStatusList(){
    	return "user/orderStatusList";
    }
    
    //信息列表
    @RequestMapping("/messageList")
    public String messageList(){
    	return "user/messageList";
    }
    
    
}
